package com.conn;

public class RegisterMessageHandler extends MessageHandler {
    RegisterInfo ri;
    public RegisterMessageHandler(RegisterInfo ri) {
        this.ri = ri;
    }

    public void run() {
//        if (hasRegistered(ri.username)) //需要额外添加错误通知机制
//            return ErrorObject.USERNAME_DUPLICATE;
//        
//        if (null == ri.name || null == ri.sex 
//                || null == ri.passwd)
//            return ErrorObject.KEYITEM_EMPTY;

        System.out.println("username:"+ri.username);
        Server.getServer().store.storeRegisterInfo(ri.username, ri);
        System.out.println("RegisterMessageHandler running");
//        return true;
    }
}
